package com.example.administrator.yuejian23.Retrofit;

import com.example.administrator.yuejian23.Bean.AboutYuejian;
import com.example.administrator.yuejian23.Bean.ActInfo;
import com.example.administrator.yuejian23.Bean.AskList;
import com.example.administrator.yuejian23.Bean.Club;
import com.example.administrator.yuejian23.Bean.ClubCourse;
import com.example.administrator.yuejian23.Bean.ClubInfo;
import com.example.administrator.yuejian23.Bean.ClubVideo;
import com.example.administrator.yuejian23.Bean.ConInfo;
import com.example.administrator.yuejian23.Bean.LoginBean;
import com.example.administrator.yuejian23.Bean.MonInfo;
import com.example.administrator.yuejian23.Bean.MonList;
import com.example.administrator.yuejian23.Bean.MyBean;
import com.example.administrator.yuejian23.Bean.MyCollect;
import com.example.administrator.yuejian23.Bean.MyOrder;
import com.example.administrator.yuejian23.Bean.MyShaitu;
import com.example.administrator.yuejian23.Bean.OrderInfo;
import com.example.administrator.yuejian23.Bean.RegisterBean;
import com.example.administrator.yuejian23.Bean.ShaituDetail;
import com.example.administrator.yuejian23.Bean.ShaituList;
import com.example.administrator.yuejian23.Bean.TrainInfo;
import com.example.administrator.yuejian23.Bean.Traindown;
import com.example.administrator.yuejian23.Bean.VideoList;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by Administrator on 2017/9/16.
 */

public interface RetrofitService {
//所有接口调用

    //登录
    @POST("login")
    Call<LoginBean> userLogin(@Query("tel") String tel,
                              @Query("password") String password);
    //注册
    @POST("reg")
    Call<RegisterBean> userRegister(@Query("tel") String tel,
                                    @Query("password") String password);
    //俱乐部列表

    @POST("lists/mod/club")
    Call<List<Club>> club();
    //俱乐部简介
    @POST("get/mod/club")
    Call<ClubInfo> clubInfo(@Query("id") String Id);
    //俱乐部课程
    @GET("get/mod/club/SessionID/2ul9sj8vlfofj122e1s98048k2/related/1/")
    Call<ClubCourse> getClubCourse(@Query("id") String id,
                                   @Query("map") String map);
    //俱乐部视频
    @GET("get/mod/club/SessionID/2ul9sj8vlfofj122e1s98048k2/related/1/")
    Call<ClubVideo> getClubVideo(@Query("id") String id,
                                 @Query("map") String map);

    //晒图列表
    @POST("lists/mod/shaitu/related/1")
    Call<List<ShaituList>> ShaituList();
    //晒图列表1
/*    @GET("lists")
    Call<List<ShaituList>> getShaiTuList1();*/
    //发布晒图
    @Multipart
    @POST("fcreate/mod/shaitu/userid/{userid}/title/{title}")
    Call<ResponseBody> SignPic(
            @Path("userid") int uid,
            @Path("title") String title,
            @Part MultipartBody.Part file
    );

 /*   public Call<okhttp3.ResponseBody> signPic(int userid, String title, MultipartBody.Part file){
        RetrofitService service = retrofit.create(RetrofitService.class);
        return  service.signpic(userid,title,file);
    }*/
    //晒图评论
    @GET("slists/mod/shaireply/related/1/shaitu_id/1")
    Call<ShaituDetail> ShaituDetail(@Query("shaitu_id") String shaitu_id);
//我的信息
    @GET("getmine/SessionID/060pn7sjorpnq5fp53kid5st54/")
    Call<MyBean> MyList(@Query("userid") int userid);
    //个人订单列表
    @GET("lists/mod/sign/listorder/update_time/vstate/0/page/1/SessionID/pf2cmg5jk9p24f2mv1kjf55bo3\n")
    Call<List<MyOrder>> getUserOrder(@Query("userid") int userid);
    //个人晒图列表
    @GET("lists/mod/shaitu/SessionID/060pn7sjorpnq5fp53kid5st54/")
    Call<List<MyShaitu>> getUserShaitu(@Query("userid") int userid);
    //个人关注列表
    @GET("lists/mod/fans/SessionID/060pn7sjorpnq5fp53kid5st54/")
    Call<List<MyCollect>> getUserGuanzhu(@Query("userid") String userid);
    //约健
    @POST("getyuejian/SessionID/060pn7sjorpnq5fp53kid5st54")
    Call<AboutYuejian> getYuejian();
    //个人设置.头像，昵称，密码
    @GET("fuserphoto/SessionID/060pn7sjorpnq5fp53kid5st54/")
    Call<List<MyBean>> setPhoto(@Query("userid") int userid);
    @GET("updatename/SessionID/060pn7sjorpnq5fp53kid5st54/")
    Call<Integer> setName(@Query("userid") int userid,
                               @Query("username")String username);
    @GET("updatepass/SessionID/060pn7sjorpnq5fp53kid5st54/userid/2/password/1234556")
    Call<Integer> setPassword(@Query("userid") int userid,
                              @Query("password") String password);
    //获取培训订单详情
    @GET("getDOrder/id/{id}/type/{type}/SessionID/{SessionID}")
    Call<OrderInfo> getOrderInfo(
           /* @Query("order_id") String order_id,
            @Query("order_type") String order_type,*/
           @Path("id") String id,
           @Path("type") String type
    );

    //获取已完成或者未参加订单
    @GET("lists/mod/{mod}/listorder/update_time/userid/{userid}/vstate/{vstate}/SessionID/{SessionID}")
    Call<List<MyOrder>> getordertype(
            @Path("mod") String mod,
            @Path("userid") int userid,
            @Path("vstate") int vstate,
            @Path("SessionID") String SessionID
    );
//我的关注
   /* @POST("get/mod/user")
    Call<MyBean> MyList(@Query("id") String id);*/

    /**
     * 训练列表
     * */
    @POST("lists/mod/train/")
    Call<List<Traindown>> getTrainList(@Query("page") int page);
    /**
     * 线下级别训练列表
     * */
    @POST("lists/mod/train/")
    Call<List<Traindown>> getTrainDegreeList(@Query("Degree") int Degree);
    /**
     * 线下级别训练列表
     * http://172.24.10.175/workout/api.php/get/mod/train/id/1
     * */
    @POST("get/mod/train/")
    Call<TrainInfo> getTrainInfo(@Query("id") String  id);
    /**
     * 问大师列表
     * http://172.24.10.175/workout/api.php/lists/mod/masterfaq/master_id/2
     * */
    @POST("lists/mod/masterfaq/")
    Call<List<AskList>> getAskList(@Query("master_id") String master_id);

  /*  @POST("lists/mod/masterfaq/")
    Call<List<AskList>> getAskList(@Query("master_id") String master_id);*/
    /**
     * 大师详情列表
     * */
    @POST("get/mod/master/")
    Call<MonInfo> getMonInfo(@Query("id") String id);
    /**
     * 大师视频列表
     * http://172.24.10.175/workout/api.php/get/mod/master/related/1/id/1/map/mvideo
     * */
    @POST("get/mod/master/related/1/")
    Call<VideoList> getVideoList(@Query("id" )String id, @Query("map") String mvideo);
    /**
     * 教师列表
     * */
    @POST("lists/mod/master/")
    Call<List<MonList>> getMonList(@Query("page") int page);

    /**
     * 首页推荐列表
     * */
    @POST("lists")
    Call<List<ActInfo>> getActList();
    /**
     * 首页推荐列表活动详情
     * */
    @POST("get/mod/activity/")
    Call<ActInfo> getActInfo(@Query("id") String id);
    /**
     * 首页推荐列表
     * */
    @POST("lists/mod/contest")
    Call<List<ConInfo>> getConList();

  /*     *//* 首页推荐列表比赛详情
     * *//*
    @POST("get/mod/contest/")
    Call<ActInfo> getConInfo(@Query("id") String id);*/




  /*  //个人中心获取信息
    @GET("getmine/SessionID/{SessionID}/userid/{userid}")
    Call<User> getuserinfo(
            @Path("SessionID") String SessionID,
            @Path("userid") int userid
    );
    //修改头像
    @GET("fuserphoto/SessionID/{SessionID}/userid/{userid}")
    Call<User> updatephoto(
            @Path("SessionID") String SessionID,
            @Path("userid") int userid
    );
    //修改昵称
    @GET("updatename/SessionID/{SessionID}/userid/{userid}/user_name/{user_name}")
    Call<UserInfo> updatename(
            @Path("SessionID") String SessionID,
            @Path("userid") int userid,
            @Path("user_name") String username
    );
    //修改密码
    @GET("updatepass/SessionID/{SessionID}/userid/{userid}/password/{password}")
    Call<Integer> updatepwd(
            @Path("SessionID") String SessionID,
            @Path("userid") int userid,
            @Path("password") String password
    );
    //获取晒图列表
    @GET("lists/mod/{mod}/SessionID/{SessionID}/userid/{userid}")
    Call<List<UserShaitu>> getusershaitu(
            @Path("mod") String mod,
            @Path("SessionID") String SessionID,
            @Path("userid") int userid

    );
    //获取关注列表
    @GET("lists/mod/{mod}/SessionID/{SessionID}/userid/{userid}")
    Call<List<UserCollect>> getcollect(
            @Path("mod") String mod,
            @Path("SessionID") String SessionID,
            @Path("userid") int userid

    );
    //获取全部订单列表
    @GET("lists/mod/{mod}/listorder/update_time/userid/{userid}/SessionID/{SessionID}")
    Call<List<UserOrder>> getallorder(
            @Path("mod") String mod,
            @Path("userid") int userid,
            @Path("SessionID") String SessionID
    );
    //获取已完成或者未参加订单
    @GET("lists/mod/{mod}/listorder/update_time/userid/{userid}/vstate/{vstate}/SessionID/{SessionID}")
    Call<List<UserOrder>> getordertype(
            @Path("mod") String mod,
            @Path("userid") int userid,
            @Path("vstate") int vstate,
            @Path("SessionID") String SessionID
    );*/
}
